package com.lyncs.ods.modules.company.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lyncs.ods.modules.company.model.CompanyUserRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 企业用户权限信息 Mapper 接口
 * </p>
 *
 * @author alex
 * @since 2022-07-11
 */
@Mapper
public interface CompanyUserRoleMapper extends BaseMapper<CompanyUserRole> {

    /**
     * 获取用户权限组内可见的企业ID
     *
     * @param userId    用户ID
     * @param companyId 企业ID
     * @return ids
     */
    List<Long> listAllAvailablePartnerId(@Param("userId") Long userId, @Param("companyId") Long companyId);
}
